<%@page import="com.xxb.entity.User"%>
<%@page import="com.xxb.entity.Comment"%>
<%@page import="com.xxb.entity.Product"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>达芙妮官方购物网</title>
		<link type="text/css" href="style/x1css.css" rel="stylesheet"/>
		<script type="text/javascript" src="script/jquery1.5.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				$("#pdetailsli").mouseover(function(){
					$("pcomment").hide();
					$("#pdetails").show();
				});
				$("#pcommentli").mouseover(function(){
					$("#pdetails").hide();
					$("pcomment").show();
				});
			});
		</script>
	</head>
	<body>
		<div id="header">
			<div class="logo"></div>
			<div class="login"> 
				<%
					User user = (User)session.getAttribute("curruser");
				 	if(user == null){
				 %> 
				<a href="main.jsp">您好，欢迎观临达芙妮官方购物网</a>&nbsp;&nbsp; 
           		<a href="l_to_login.jsp">登陆</a> 
                |
				<a href="l_to_reg.jsp">注册</a>
           		<%}else{ %>
           		<a href="main.jsp">您好，<%=user.getName() %></a>&nbsp;&nbsp;
           		<a href="l_exit.jsp" >退出</a> 
                |
				<a href="l_member.jsp" >会员管理平台</a>
           		<%} %> 
			</div>
			<div class="menu">
				<ul>
					<li class="a" style="width:111px;"><a href="main.jsp">首页</a></li>
					<li class="b" style="width:95px;"><a href="#">新品</a></li>
					<li class="c" style="width:119px;"><a href="#">靴子</a></li>
					<li class="d" style="width:95px;"><a href="danxie.jsp">单鞋</a></li>
					<li class="e" style="width:95px;"><a href="#">凉鞋</a></li>
					<li class="f" style="width:119px;"><a href="#">包.饰品</a></li>
					<li class="g" style="width:119px;"><a href="#">特价专区</a></li>
				</ul>
				<div class="cart">
                    购物车（1）
					<a href="cart.jsp"><input type="button" value="去结算" style="cursor:pointer"/></a>
				</div>
			</div>
			<div class="search">
				<div class="hottag">
                 热门分类：&nbsp;
					<a href="#">单鞋</a>&nbsp;|&nbsp;
					<a href="#">高跟鞋</a>&nbsp;|&nbsp;
					<a href="#">鱼嘴</a>&nbsp;|&nbsp;
					<a href="#">平底</a>&nbsp;|&nbsp;
					<a href="#">坡跟</a>&nbsp;|&nbsp;
					<a href="#">真皮</a>
				</div>     
				<div class="searchinput">
					<input type="text" class="search-area"/>
					<input type="button" class="search-button"/>
				</div>	
			</div>
		</div>
		<div id="content" style="height:autopx">
			<div class="left">
				<div class="top10">
					<h3>热销排行榜</h3>
				</div>
				<img src="images/left_bar_2_20110211220848.jpg"/>
				<img src="images/left_bar_1_20110211220919.jpg" style="margin-top:20px;"/>
				<div class="browse">
					<h3>最近浏览</h3>
					<img src="images/liulan.PNG"/>
				</div>
			</div>
			<div class="right">
				<p style="margin:8px 0 8px 20px;">当前位置：<a href="index.jsp">首页</a>><a href="danxie.jsp">单鞋</a>><b>达芙妮足上花开－真皮百搭立体花朵低跟单鞋</b></p>				
				<div class="jianjie">
					<div class="top">
						<div class="topleft">
							<div class="show">
								<img src="images/111077001_01.jpg"/>
							</div>
							<div class="minshow">
								<a href="#"><img src="images/111077001_11.jpg"/></a>
								<a href="#"><img src="images/111077001_12.jpg"/></a>
								<a href="#"><img src="images/111077001_13.jpg"/></a>
								<a href="#"><img src="images/111077001_14.jpg"/></a>
							</div>
						</div>
						<div class="topright">
							<%
								Product p = (Product)request.getAttribute("p");
							
							 %>
							<p class="p1"><%=p.getProductname() %></p>
							<img src="images/icon.gif"/>
							<p>
								<br/>商品货号：<%=p.getCode() %><br/>
								官网价：<span><%=p.getPrice() %></span> 元 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;市场价：<%=p.getMprice() %>
							</p>
							产品规格
							<br/><br/><br/>
							颜色：<%=p.getColor() %><br/>
							尺码：<%=p.getSize() %><br/>
							<form action="l_add_cart.jsp" method="post">
								<input type="hidden" value="<%=p.getId() %>" name="id"/>
								数量：<input type="text" size="10px" name="num" value="1"/>
								<input type="submit" value="购买"/>
							</form>
								&nbsp;&nbsp;&nbsp;<input type="button" value="收藏"/>
						</div>
					</div>
					<div class="bottom">
						<div id="ulbar" class="banner">
							<ul>
								<li id="pdetailsli" style="border-bottom:3px solid #000000;">产品详情</li>
								<li id="pcommentli" style="border-bottom:3px solid #000000;">用户评价</li>
								<li>购买咨询</li>
								<li>尺码表</li>
								<li style="border-right:none">参与评论</li>
							</ul>							
						</div>
						
						<div id="pdetails" class="bigpic">
							<div class="friendly">
								<h6>商品说明</h6>
								<p>立体花朵时尚百搭 真皮材质柔软透气 连衣裙和裤子都可以协调搭配</p>
							</div>
							<img src="images/111077001_01_001.jpg"/>
							<img src="images/111077001_02_001.jpg"/>
							<img src="images/111077001_03_001.jpg"/>
						</div>
						
						<div id="pcomment" style="height: audo;border:1px solid #000000;margin-top:10px;">
							<h2 style="padding-left: 20px;">用户评论内容</h2>
							<hr/>
							<%
								
								List<Comment> commentlist = (List<Comment>)request.getAttribute("commentlist");
							 %>
							 
							<div>
							<form action="l_addcomment.jsp" method="post">
								<input type="hidden" name="pid" value="<%=p.getId() %>"/>
								<textarea  style="width:710px; height: 100px;margin-bottom: 10px;margin-left: 4px;" name="content">请在此输入您的评论</textarea>
								<input type="submit"  value="提交评论" style="margin-bottom: 20px;"/><br />
							</form>
							</div>
							<span>共有<%=commentlist.size() %>条顾客评论</span><br/>
							<%
								if(commentlist.size() != 0){
									for(Comment comment:commentlist){
							 %>
							 	<span><%=comment.getUser().getUseremail()%></span>
								<span><%=comment.getComtime() %></span><br/>
								<span><%=comment.getContent() %></span><br/><hr />
							<%}} %>
							
						</div>

					</div>
				</div>
			</div>
		</div>
		<div id="footer">
			<img src="images/tel.jpg" style="float:right"/>
			<img src="images/footer.PNG" style="margin-top:10px;"/>
			<div class="footerf">
				<img src="images/foot-logo.jpg" style="float:right"/>	
			</div>
			<div style="margin-top:27px;float:right">
				<img src="images/oo.PNG" style="float:right"/>
			</div>
		</div>
	</body>
</html>